<%@ page import="java.util.*, milu.*, milu.models.*,com.google.appengine.api.datastore.*" %>
<jsp:include page="/header.jsp" />
<%
MyUser myUser = (MyUser)request.getAttribute("myUser");
%>

        <div id="link-form">
			
						
			<h2 class="cabin">Modifica Account:</h2>
			
            <form method="post" enctype="multipart/form-data">
				<p>
					<label for="avatar">Avatar:</label>
                    <input id="avatar" type="file" name="avatar">
                    <%
                    Key avatarKey = myUser.getAvatarKey();
                    if(avatarKey != null) {
                    %>
                    <img src="/serve/<%=avatarKey.getId()%>.png" />
                    <% } else { %>
                    <img src="/images/default-avatar.png" />

                    <% } %>
				</p>
				<p>
					<label for="nome">Nome:</label>
                    <input id="nome" type="text" name="name" value="<%=myUser.getName()%>">
				</p>
				
				<p class="last-p"><button type="submit">Modifica!</button></p>
			</form>
        </div><!-- /link-form -->
<jsp:include page="/footer.jsp" />
